/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.farent.solutions.plugins.stripes.hyperstripes.core.tags;

import com.farent.solutions.plugins.stripes.hyperstripes.core.ComponentModel;
import com.farent.solutions.plugins.stripes.hyperstripes.core.DefaultComponentModel;
import com.farent.solutions.plugins.stripes.hyperstripes.core.FormChildComponentModel;
import com.farent.solutions.plugins.stripes.hyperstripes.core.FormMode;
import com.farent.solutions.plugins.stripes.hyperstripes.core.ModelProvider;

/**
 *
 * @author farouka
 */
@ModelProvider("input")
public class InputComponentModel extends DefaultComponentModel implements FormChildComponentModel
{
    private FormMode mode;

    private String name;

    public InputComponentModel() {
        this.name = "input";
        this.mode = FormMode.EDIT;
    }

    public InputComponentModel(String name) {
        this.name = name;
        this.mode = FormMode.EDIT;
    }

    public InputComponentModel(FormMode mode, String name) {
        this.mode = mode;
        this.name = name;
    }

    @Override
    public boolean isChild(ComponentModel child) {
        return false;
    }

    @Override
    public void setMode(FormMode mode) {
        this.mode = mode;
    }

    @Override
    public FormMode getMode() {
        return mode;
    }
    @Override
    public String getName() {
        return name;
    }
}
